<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title>Dev132.Net - 欢迎您!</title>
	<link href="css/blueprint/screen.css" type="text/css" rel="stylesheet" media="screen, projection" />
	<!--[if IE]><link rel="stylesheet" href="css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
	<link href="css/jquery.autocomplete.css" type="text/css" rel="stylesheet" />

	<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
	<script type="text/javascript" src="js/jquery.autocomplete.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$('#header').css("span-24 last");
			$('#searchDiv').css("span-24 last");
			$('#googleKeyWord').addClass("keyWord");
			$('#baiduKeyWord').addClass("keyWord");
			$('#bingKeyWord').addClass("keyWord");
			$('#bingLogo').addClass("bingLogo");
			$("input[type='submit']").addClass("searchButton");
			$("input[name='engineSelect']").click(changeEngine);
			changeEngine();
			$("input[type='text'][id$='KeyWord']").keyup(function(){
				var keyWord = $.trim($(":input:visible[type='text'][id$='KeyWord']").val());
				if(keyWord!=''){
					keyWord = encodeURIComponent(keyWord);
					var engine = $(":radio[name='engineSelect']:checked").attr('id');;
					var url = '';
					var data = null;
					if(engine==='google'){
						url = "suggest.php?engine=google&keyWord="+keyWord+"&"+(new Date()).valueOf();
						$.getJSON(url,{},function(jsonData){
							var items = jsonData[1];
							data = new Array(items.length);
							$.each(items,function(i,item){
								data[i]=item[0];
							});
							$(":input:visible[type='text'][id$='KeyWord']").autocomplete(data,{scroll:false});
						});
					}else if(engine==='baidu'){
						url = "suggest.php?engine=baidu&keyWord="+keyWord+"&"+(new Date()).valueOf();
					}else if(engine==='bing'){
						url = "suggest.php?engine=bing&keyWord="+keyWord+"&"+(new Date()).valueOf();
					}
				}
			});
		});
		function changeEngine(){
			$('#keyWord').val($(":input:visible[type='text'][id$='KeyWord']").val());
			var selectedId = $(":radio[name='engineSelect']:checked").attr('id');
			$(".engine[id="+selectedId+"Div]").show();
			$(".engine[id!="+selectedId+"Div]").hide();
			$(":input:visible[type='text'][id$='KeyWord']").val($('#keyWord').val()).select().focus();
		}

	</script>
	<style type="text/css">
	.keyWord {
		font-size: 15px;
		height:1.4em;
		width: 30em;
		vertical-align: middle;
		padding-top: 4px;
	}
	.searchButton{
		font-size:14px;
		height:28px;
	}
	.engineSelect{
		font-size: 15px;
		height:1.9em;
		vertical-align: middle;
		padding-top: 4px;
	}
	</style>
</head>
<body>
<div class="container">
<div id="header"><h1>#Logo网站Logo</h1></div>
<div id="searchDiv" align="center">
<input type="hidden" name="keyWord" id="keyWord" />
<div id="googleDiv" align="center" class="engine">
<div style="display:block;height:120px;overflow: hidden;">
<img title="Google" width="276" height="110" src="img/logo/google_logo_cn.gif" alt="Google" />
</div>
<form method="get" action="http://www.google.com/search" target="_blank" id="googleSearch">
<input type="text" id="googleKeyWord" name="q" title="Google 搜索" autocomplete="off" /> <input type="submit" value="搜索一下" />
</form>
</div>
<div id="baiduDiv" class="engine" align="center">
<div style="display:block;height:120px;overflow:hidden;">
<img width="270" height="129" alt="Baidu" title="Baidu" src="img/logo/baidu_logo_cn.gif" style="margin-top: 20px;"/>
</div>
<form method="get" action="http://www.baidu.com/s" target="_blank" id="baiduSearch">
<input type="text" id="baiduKeyWord" name="wd" size="42" maxlength="100" autocomplete="off" />
<input type="submit" value="搜索一下" />
</form>
</div>
<div id="bingDiv" class="engine" align="center">
<div style="display:block;height:120px;overflow:hidden;">
<img alt="Bing" title="Bing" src="img/logo/bing_logo_cn.gif" style="margin-top:30px;"/>
</div>
<form method="get" action="http://bing.com/search" target="_blank" id="bingSearch">
<input type="text" title="请输入您的搜索条件" name="q" id="bingKeyWord" autocomplete="off" />
<input type="submit" value="搜索一下" />
</form>
</div>
<div align="center">
<input type="radio" id="google" name="engineSelect" checked="checked" /><label for="google">谷歌</label>
<input type="radio" id="baidu" name="engineSelect" /><label for="baidu">百度</label>
<input type="radio" id="bing" name="engineSelect" /><label for="bing">必应</label>
</div>
</div>
<div id="navigationDiv"></div>
<div id="footer"></div>
</div>
<table style="visibility: hidden;">
<tr></tr>
</table>
</body>
</html>
